package br.com.vantagensaki.utils.generics;

import java.lang.reflect.Method;
import java.util.List;
import java.util.Set;
import br.com.vantagensaki.utils.exception.ObjetoNaoEncontradoException;

public interface ExecutorDeBuscas<T>
{
    public T busca(Method method, Object[] queryArgs, String namedQuery) 
		throws ObjetoNaoEncontradoException;

    public T buscaParametrizada(Method method, Object[] queryArgs, String namedQuery)
		throws ObjetoNaoEncontradoException;
    
    public List<T> buscaLista(Method method, Object[] queryArgs, String namedQuery);

    public List<T> buscaListaParametrizada(Method method, Object[] queryArgs, String namedQuery);
    
    public Set<T> buscaConjunto(Method method, Object[] queryArgs, String namedQuery);

    public Set<T> buscaConjuntoParametrizada(Method method, Object[] queryArgs, String namedQuery);
    
    public T buscaPrimeiro (Method method, Object[] queryArgs, String namedQuery) 
		throws ObjetoNaoEncontradoException;

    public T buscaPrimeiroParametrizada (Method method, Object[] queryArgs, String namedQuery)
		throws ObjetoNaoEncontradoException;

    public T buscaUltimo (Method method, Object[] queryArgs, String namedQuery)
		throws ObjetoNaoEncontradoException;

    public T buscaUltimoParametrizada (Method method, Object[] queryArgs, String namedQuery)
		throws ObjetoNaoEncontradoException;
    
    public List buscaListaPaginada(Method metodo, Object[] argumentos, String nomeQuery, String nomeQueryCount, int pageSize);
}
